#include<stdio.h>

int main()
{
	int max_node = 0;
	FILE*fp;
	int src,cnt,dest,i;
	int non=0,links=0;
	if((fp = fopen("wbCt100Sep08/webgraph.bin","r")) == NULL)
	{
		printf("File Not found\n");
		return 0;
	}
	while(fread(&src,1,sizeof(int),fp) != 0)
	{
		fread(&cnt,1,sizeof(int),fp);
		non += 1;
		links += cnt;
		for(i=0;i<cnt;i++)
		{
			fread(&dest,1,sizeof(int),fp);
			if(dest > max_node)
				max_node = dest;
		}
	}
	printf("Nodes = %d, Non = %d, links = %d\n",max_node+1,non,links);
}
